import mongoose from 'mongoose'

import mongoConfig from '../config/mongo.js'

mongoose.connect(mongoConfig.uri, mongoConfig.options)
.then(() => {
  console.log('连接成功')
})
.catch(err => {
  console.error(err.message || '连接失败')
})

mongoose.disconnect()